<div class="am-u-sm-12 widget main-w">
	{if $notPopup}
	<ol class="am-breadcrumb">
		<li class="am-active">账号</li>
	</ol>
	{/if}
	<div class="am-u-sm-12 cl-p">
		<form class="am-form-inline tpl-form-border-form" action="" method="get">
			<div class="am-u-sm-12 cl-p" >
				<div class="am-form-group am-u-sm-3">
					<input type="text" class="am-form-field" name="username" placeholder="请输入用户名" value="{$Think.get.username}">
				</div>
				<!--<div class="am-form-group am-u-sm-3">-->
						<!--<select class="filter_type" data-am-selected="{btnWidth:'100%', btnSize: 'sm'}" name="role_id" style="height: 33px;" value="{$Think.get.filter_type}">-->
							<!--<option {$Think.get.filter_type?'':selected} value="0">角色-全部</option>-->
							<!--{$role_ids}-->
						<!--</select>-->
				<!--</div>-->
				<div class="am-u-sm-6 ">
					<button type="submit" class="am-btn am-btn-sm am-btn-primary am-radius">查询<i class="am-icon-search"></i></button> 
				</div>
			</div>
			
		</form>
	</div>
	<div class="am-u-sm-12 cl-p">
		<form class="am-form-inline tpl-form-border-form">
			<div class="widget am-u-sm-12 cl-p">

				<div class="am-u-sm-12 am-form-group cl-p">
					<div class="am-u-sm-12">
						{if $Think.get.filter}
						<div class="am-btn-group am-u-sm-12 am-btn-group-xs cl-p">
							<a href="{:url('index')}" class="am-btn am-btn-default"> 查看可用账号</a>
						</div>
						{else/}
						<div class="am-btn-group am-u-sm-12 am-btn-group-xs cl-p">
							<a href="{:url('add')}" class="am-btn am-btn-default"><span class="am-icon-plus"></span> 添加</a>
							<a href="{:url('index')}?filter=delete" class="am-btn am-btn-default"> 查看已删除账号</a>
						</div>
						{/if}
						<table width="100%" class="am-table am-table-compact am-table-bordered am-table-radius am-table-striped am-text-truncate tpl-table-black">
							<thead>
								<tr>
									{if input('param.op')}
									<th>操作</th>
									{/if}
									<th>账号</th>
									<!--<th>角色</th>-->
									<th>手机号</th>
									<th>状态</th>
									{if $Think.get.filter}
									{else/}
									{if input('param.op')}
									{else/}
									<th>操作</th>
									{/if}
									{/if}
								</tr>
							</thead>
							<tbody>
								{foreach $list as $key => $item}
								<tr class="gradeX" data-id="{$item.user_id}">
									{if input('param.op')}
									<td> 
									<div class="tpl-table-black-operation">
										<a href="javascript:;" class="choose">
											<i class="am-icon-pencil"></i> 选中
										</a>
									</div>
									</td>
									{/if}
									<td class="username">{$item.username}</td>
									<!--<td>{$item.role_name}</td>-->
									<td class="phone">{$item.mobile}</td>
									<td>
										{if $Think.get.filter}
										已删除
										{else/}
										{$item.state==9?'已禁用':'已启用'}
										{/if}
									</td>
									
									{if $Think.get.filter}
										{else/}
										{if input('param.op')}
										{else/}
									<td> 
										
										<div class="tpl-table-black-operation">
											{if $item.state == 9}
											<a href="javascript:;" class="startusing" data-method="startusing">
												<i class="am-icon-pencil"></i> 启用
											</a>
											{else/}
											<a href="javascript:;" class="tpl-table-black-operation-del forbidden" data-method="forbidden">
												<i class="am-icon-trash"></i> 禁用
											</a>
											{/if}
											<a href="{:url('edit',['user_id'=>$item.user_id])}">
												<i class="am-icon-pencil"></i>编辑
											</a>
											<a href="javascript:;" class="tpl-table-black-operation-del delete-list" data-method="delete">
												<i class="am-icon-pencil"></i>删除
											</a>
										</div>
										
									</td>
									{/if}
									{/if}
								</tr>
								{/foreach}
							<?php if(!count($list)){?>
								<tr><td>无数据</td></tr>
							<?php }?>
							</tbody>
						</table>
					</div>
				</div>
				<div class="am-u-sm-12">
					<div class="am-fr">
						{$pager}
					</div>
				</div>

			</div>
		</form>
	</div>
</div>